info = {}
info1 = dict()
print(type(info), type(info1))
print(info)
# 非空字典
info2 = {"name": "张三", "age": 22, "height": 1.88}
print(info2)
print(type(info2))


info = {"name": "张三"}
info["name"] = "李四"
print(info)
info["age"] = 22
print(info)

info = {
"name": "tom",
"age": 18,
"gender": "男",
"hobby": {"read": "小说", "sport": ["篮球", "足球"]}
}

# a1 = info["age"]
# print(a1)
print(info["age"])
# a2 = info.get("age")
# print(a2)
print(info.get("age"))
# print(info["aa"])
print(info.get("aa"))
# a1 = info["hobby"]
# print(a1) # {'read': '小说', 'sport': ['篮球', '足球']}
# print(a1["sport"]) # ['篮球', '足球']
# print(a1["sport"][1])
print(info["hobby"]["sport"][1])
print(info.get("hobby").get("sport")[1])
